﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace SadlandVillage.Core
{

    public abstract class MiniGame : GameScene
    {
        public virtual event BackToMapEventHandler GameCancelled;
        public virtual event BackToMapEventHandler GameWon;
        public virtual event BackToMapEventHandler GameLost;
        public virtual event EventHandler GameActivated;
        public virtual event EventHandler GameDeactivated;

        public bool Active
        {
            get
            {
                return true;
            }
            set
            {
                if (value && GameActivated != null)
                {
                    GameActivated(this, new EventArgs());
                }
                else if (GameDeactivated != null)
                {
                    GameDeactivated(this, new EventArgs());
                }
            }
        }

        public MiniGame(ContentManager Content, SpriteBatch spriteBatch) 
            : base(Content, spriteBatch) {}

        public abstract void UnloadContent();
    }
}
